package com.huangliusong.listener;

import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextRefreshedEvent;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

/**
 *监听刷新时间
 * @author huangliusong
 * @since 2018/10/23
 * {@link ApplicationListener}
 */
@Order(Ordered.LOWEST_PRECEDENCE)
public class AfterHelloWorldApplicationListener implements ApplicationListener<ContextRefreshedEvent> {
    @Override
    public void onApplicationEvent(ContextRefreshedEvent event) {
        System.out.println("After监听上下文事件："+event.getApplicationContext().getId()+"，"+event.getTimestamp());
    }
}
